package com.ruoyi.androidPad.service.impl;

import com.ruoyi.androidPad.service.UploadService;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.utils.file.FileUploadUtils;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

/**
 * @author LiSuxuan
 * @date 2021年 08月 16日 19:25
 */
@Service
public class UploadServiceImpl implements UploadService {

    @Override
    public void uploadFile(String deviceID, MultipartFile file) throws IOException {
        String images = FileUploadUtils.upload(RuoYiConfig.getPadUploadPath(), file);
        System.out.println(images);
        System.out.println(file.getOriginalFilename());
    }
}
